package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.RolePermissionMapper;
import cn.csdj.sism.pojo.RolePermission;
import cn.csdj.sism.service.RolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author 李心怡
 * 2023/4/10
 */
@Service
public class RolePermissionServiceImpl implements RolePermissionService {
    @Autowired
    private RolePermissionMapper rolePermissionMapper;
    @Override
    public int insert(RolePermission rolePermission) {
        return rolePermissionMapper.insert(rolePermission);
    }

    @Override
    public int deleteById(Integer id) {
        return rolePermissionMapper.deleteById(id);
    }

    @Override
    public int update(RolePermission rolePermission) {
        return rolePermissionMapper.updateById(rolePermission);
    }

    @Override
    public RolePermission selectById(Integer id) {
        return rolePermissionMapper.selectById(id);
    }

    @Override
    public List<RolePermission> selectAll() {
        return rolePermissionMapper.selectList(null);
    }
}
